1. Field of the Invention
This invention relates to a device for correcting mechanical errors in an NC machine, and more particularly to positioning accuracy.
2. Description of the Related Art
In order to improve the accuracy of repetitive positioning in operating an NC machine, mechanical errors such as backlash and lost motions, inherent in mechanical systems, must be corrected. Mention has been made as to the correction of mechanical errors in, e.g., Japanese Patent Application (UPA) Nos. 36808/1977 and 36808/1984 (the term "UPA" as used herein means "unexamined published application").
FIG. 6 is a block diagram showing an example of a control system for correcting backlash in a conventional NC machine. In the figure, interpolation processing means produces an incremental amount of movement of a control shaft of the NC machine by means of approximation every sampling time. Speed adjustment processing means is for multiplying the interpolated incremental amount of movement by an adjusting speed to thereby calculate a command value of the incremental amount of movement, and servo control section 3 controls a servomotor 31 by receiving the command value of incremental amount of movement of the control shaft calculated every sampling and transmitted from the speed adjustment processing means 2.
The servo control section 3 causes a subtracting unit 33 to calculate the difference between the received command value of the incremental amount of movement calculated every sampling and the position feedback value detected every sampling; causes an adding unit 34 and an integrating unit 35 to accumulate the calculated differences progressively. In addition a multiplying unit 36 multiplies the progressively accumulated value by a position loop gain Kp. The value thus multiplied is the speed command. This speed command is received by a speed loop control section comprising a speed control amplifier 37 and a speed detector 38 and is further subjected to a current loop control by an amplifier 39 for position-controlling the servomotor 31.
Reference numeral (4) designates a memory table containing backlash correction amounts B to be added upon change of direction of the control shaft. The memory table 4 comprises, a table 4a containing backlash correction amounts Bcr that are used in the case where the forwarding mode switches from the rapid mode to the cutting mode and vice versa. A table 4b containing backlash correction amounts Bc that are used when the forwarding mode, which is the cutting mode, does not change and thus the cutting mode continues and a table 4c containing backlash correction amounts Br that are used when the forwarding mode, which is the rapid mode, remains unchanged as the direction of movement changes. Reading means 5 selects the backlash correction amount by switching the respective tables 4a to 4c of the memory table 4; and 6, transfer means transmits the backlash correction amount to the adding unit (8).
An operation of the control system for backlash correction in the NC machine thus constructed will next be described with reference to the flowchart shown in FIG. 7.
The interpolation processing means 1 approximates an incremental amount of movement of the control shaft from a machining configuration every sampling and applies the approximated amount to the speed adjustment processing means 2 which then subjects the applied incremental amount of movement of the control shaft to a speed adjustment process to thereby calculate a command value of incremental amount of movement and apply it to the adding unit 7. At this time, a central processing unit (CPU) 12 judges whether or not the direction of movement is inverted (Step S71). If not, there will be no backlash correction because the movement is continuous in the same direction and thus the command value of incremental amount of movement is directly applied to the servo control section 3 to thereby position-control the motor 31.
If the direction of movement is inverted as the result of the speed adjustment processing, it is judged whether the forwarding mode immediately before the inversion is the rapid mode or the cutting mode (Step S72). If it is the cutting mode, then it is judged whether the forwarding mode immediately after the inversion is the cutting mode or the rapid mode (Step S73). If it is still the cutting mode, a backlash correction amount Bc for the cutting mode is retrieved from the table 4b by the reading means 5 (Step S74).
If the forwarding mode immediately before the inversion of the direction of movement is the rapid mode in Step S72, it is judged whether the forwarding mode immediately after the inversion is the rapid mode or the cutting mode (Step S75). If the rapid mode continues, a backlash correction amount Br is retrieved from the table 4c (Step S76).
If the forwarding mode before and after the inversion of the direction of movement switches from the cutting mode to the rapid mode or vice versa (Steps S73 and S75), a backlash correction amount Bcr to be applied when the mode is changed is retrieved from the table 4a (Step S77).
After retrieving the backlash correction amount corresponding to the forwarding mode before and after the inversion of the direction of movement from the table 4 in this way, it is judged whether the direction of movement after the inversion is positive or negative by the transfer means 6 (Step S78). If it is negative, the sign of the retrieved backlash correction amount is made negative (Step S79). Otherwise, its sign remains unchanged, and either the positive or negative backlash correction amount as appropriately processed is applied to the adding unit 7 so that it will be added to the command value of incremental amount of movement supplied from the speed adjustment processing means 2 (Step S 80). This ends the backlash correction amount processing. This process is performed every sampling, and thus the backlash corrected-command value of incremental amount of movement is applied to the servo control section 3 to perform position control of the motor 31.
FIGS. 8(a), 8(b) and 8(c) are explanatory diagrams showing the operation of the control shaft at its respective inverting points when the above-described conventional backlash correction has been made. FIGS. 8(a) and 8(b) show the case where the control shaft moves from point A to point B; the direction of its movement is inverted twice at point B and point C; and then the control shaft resumes its movement up to point D. FIG. 8(a) shows a case of the movement between point A and point D in the cutting mode, FIG. 8(b) in the rapid mode, respectively. FIG. 8(c) shows the case where the control shaft moves in the cutting mode from point A to point B; the direction of its movement is inverted twice first at point B and then at point C; the control shaft moves in the rapid mode from point C to point D; the direction of its movement is inverted at point D and then at point E; and the control shaft further moves up to point F in the cutting mode.
When the control shaft moves through the path of points A, B, C, and D in the cutting mode as shown in FIG. 8(a) and if it is supposed that the initial value EB of a progressive value of backlash correction amounts at point A is zero, a backlash correction amount-Bc is added to the command value of incremental amount of movement at point B. At point C, a backlash correction amount Bc is added to the command value of incremental amount of movement to thereby make the progressive value .SIGMA.B of the backlash correction amounts at point D equal to zero. Likewise, when the control shaft moves through the path of points A, B, C, and D in the rapid mode as shown in FIG. 8(b) and if it is supposed that the initial value .SIGMA.B of a progressive value of backlash correction amounts at point A is zero, a backlash correction amount-Br is added to the command value of incremental amount of movement at point B. At point C, a backlash correction amount Br is added to the command value of incremental amount of movement to thereby make the progressive value EB of the backlash correction amounts at point D equal to zero.
When the control shaft moves from point A to point B in the cutting mode, then through points B, C, and D in the rapid mode, and through points D, E, and F in the cutting mode again and if it is supposed that the initial value .SIGMA.B of a progressive value of backlash correction amounts at point A is zero, a backlash correction amount-Bcr is added to the command value of incremental amount of movement at point B. At point C, a backlash correction amount-Br is added to the command value of incremental amount of movement, and at point D a correction of -BCR is added, a backlash correction amount Bc is added to the command value of incremental amount of movement at point E to thereby make the progressive value .SIGMA.B of the backlash correction amounts at point F equal to Br+Bc-Bcr-Bcr. Since the progressive value .SIGMA.B of the backlash correction amounts at point F must be zero, it is necessary to store the backlash correction amount Bcr when the forwarding mode is changed, which is equal to (Br+Bc)/2, in the table (4a).
Since a device for correcting mechanical errors such as backlash in a conventional NC machine is constructed as described above, it is necessary to judge the conditions including the forwarding mode before and after the inversion of the direction of movement. Of course, the larger the number of such conditions, the more complicated the process becomes.
Since the amount of correction of a mechanical error such as backlash is added to its command value (speed command), if corrections are to be made repetitively, it is necessary to calculate each correction amount and store it in the memory table so that the mechanical locus will not be deviated due to control points being erroneously positioned, and this complicates the preparation of the memory table.
Further, when the control shaft moves from point A to point B in the cutting mode; from point B to point G in the rapid mode; and through points G, C, and D in the cutting mode as shown in FIG. 9 and if it is supposed that the initial value EB of a progressive value of backlash correction amounts at point A is zero, the progressive value .SIGMA.B of the backlash correction amounts at point D is Bc-Bcr. Thus, in order to make the progressive value EB equal to zero at point D, it is necessary to add a correction amount, (Bcr-Bc) at point G, thereby requiring that not only changes in the direction of movement but also the changes in forwarding modes must be judged for accurate correction.
In the case where mechanical errors such as lost motions which involve continuous changes caused by forwarding speeds and lubricating conditions of guiding surfaces of the machine are corrected, the conventional method of adding the mechanical error correction amount to the command value of the incremental amount of movement required a complicated process of preventing deviations at each control point.